package com.nkzy.config;

import com.nkzy.listener.FirstListener;
import com.nkzy.listener.SecondListener;
import org.springframework.boot.web.servlet.ServletListenerRegistrationBean;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Create by 王建烨 on 2022/4/2 8:30
 **/

@Configuration
public class ListenerConfig {
    @Bean
    public ServletListenerRegistrationBean getBean(){
        ServletListenerRegistrationBean bean = new ServletListenerRegistrationBean(new SecondListener());
        return bean;
    }
}
